package com.itrencai.d12_Recurtion.printstream;

import java.io.FileOutputStream;
import java.io.PrintStream;

//使用打印流高效方便写数据
public class PrintDemo1 {
    public static void main(String[] args) throws Exception{
        //1.创建一个打印流对象
        //PrintStream ps=new PrintStream(new FileOutputStream("E:\\javalearn\\opp-app\\oop-app\\src\\ps.txr"));
        PrintStream ps=new PrintStream("E:\\javalearn\\opp-app\\oop-app\\src\\ps.txt");
        ps.print(97);
        ps.print('a');
        ps.print(23.3);
        ps.print(true);
        ps.print("打印流输入啥就打印啥");

        ps.close();
        System.out.println("打印流完成了！");

    }
}
